package edu.wpi.first.wpilibj.robot;
import edu.wpi.first.wpilibj.*;
/**
 *
 * @author JoeJev
 */
public class BridgeMotor extends Motor
{
    final double MAXANGLE = (3 * Math.PI / 4) / 2 * Math.PI;
    Joystick jStick;
    int lowerButton, raiseButton;
    public BridgeMotor(Joystick j, Jaguar jag)
    {
        this(j,jag,new Keybinds());
    }
    
    public BridgeMotor(Joystick j, Jaguar jag, Keybinds kb)
    {
        super(jag);
        jStick = j;
        lowerButton = kb.lowerArmButton;
        raiseButton = kb.raiseArmButton;
    }
    
    public void run()
    {
        while (true)
        {
            if (jStick.getRawButton(raiseButton)){
                theJag.set(.5);
                System.out.println("raising");
            }
            else if (jStick.getRawButton(lowerButton))
                theJag.set(-.5);
            else
                theJag.set(0);
        }
    }
}
